![]() |
ComponentSetTarget |
||||
Header: | Components.h | Carbon status: | Supported | |
Calls a component’s target request function and informs a component that it has been targeted by another component.
SInt32 ComponentSetTarget ( ComponentInstance ci, ComponentInstance target );
The component instance to which to send a target request (the component that has been targeted). You can use a component identifier here, but you must coerce the data type appropriately.
The component instance issuing the target request.
The value that the targeted component instance returns in response to the target request, or badComponentSelector if the targeted component does not support the target request.
Your component can target a component instance without capturing the component or your component can first capture the component and then target a specific instance of the component.
You should not target a component instance if the component does not support the target request. Before calling this function, you should issue a can do request to the component instance you want to target to verify that the component supports the target request. After receiving a target request, the targeted component instance should call the component instance that targeted it whenever the targeted component instance would normally call one of its defined functions.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)